<?php
	// testing
	echo "This has " . $num_row . " rows and " . $num_col . " columns";
?>

<table border=2>

<?php
	$pr = false;
	while ($row)
	{
		if ( !$pr)
		{
			?>
			
			<tr> <?php
			foreach (array_keys($row) AS $header)
			{
				if(!is_int($header))
				{
					?>
					<th> <?php echo "$header"; ?> </th>
					<?php
				}
			}
			?>
			</tr>
			
			<?php $pr = true;
		}
		?>
	
		<tr> <?php
		foreach ($row AS $key=>$value)
		{
			if (!is_int($key))
			{
				?>
				<td> <?php echo "$value"; ?> </td>
				<?php
			}
		}
		?>
		</tr>
		<?php
	}
?>

</table>